package 面向对象中级.练习;

public class Car extends Vehicle {

    private String type;//类型

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public int getSumRent(int days) {
        int moneys = 0;
        switch (type) {
            case "两项":
                moneys = 300;
                break;
            case "三厢":
                moneys = 350;
                break;
            case "越野":
                moneys = 500;
                break;
        }
        return moneys * days;
    }
}
